#ifndef WHITESPACEWATERMARKGENERATOR_H
#define WHITESPACEWATERMARKGENERATOR_H

#include <QRegExp>
#include "textwatermarkgenerator.h"

namespace Wishmaster
{
	class WhitespaceWatermarkGenerator : public TextWatermarkGenerator
	{
	public:
		WhitespaceWatermarkGenerator();
		virtual ~WhitespaceWatermarkGenerator();

		virtual QString id();
		virtual TextWatermarkGeneratorPtr clone();
		
		virtual QString cast(const QString& input, const QByteArray& watermark);
		virtual bool probe(const QString& input);
		virtual QByteArray decode(const QString& input);

	private:
		QString convert(const QByteArray& watermark);
		void encodePart(unsigned char part, QString& output);

		static const int Boundary = 0x2800;
		//static const int Boundary = 0x0e3a;
		static const int Base = 0x2000;
	};
}

#endif // WHITESPACEWATERMARKGENERATOR_H
